package com.whpost.service.dao.t;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.whpost.service.entity.t.TMonth;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author YinZhuoyi
 * @since 2024-10-28
 */
public interface TMonthDao extends BaseMapper<TMonth> {


    @Select("select to_char(ksrq,'yyyy-MM-dd') || '|' || to_char(JZRQ,'yyyy-MM-dd') from t_month where year=#{year} and yf=#{yf}")
    String getLqsj(@Param("year") String year, @Param("yf") String yf);

    @Select("select to_char(jzrq-2,'yyyy-mm-dd') from t_month where year=#{year} and xh=#{xh}")
    String getMonthJzrq(@Param("year") String year,@Param("xh") int xh);

}
